<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<title>Sample3 - simple-template</title>
<script type="text/javascript" src="../../simple-template.js"></script>
</head>
<body>
<div id="template-id">
$# null@emptyIfNull@defaultIfEmpty:" value "@trim # //value<br>
$# 4@times:5,6 # //120
</div>
<script type="text/javascript">
	var html = new SimpleTemplate().parse("template-id", null, {addon:{"times":function(target, v1, v2){
			return target * v1 * v2;
		}
	}});
	document.getElementById("template-id").innerHTML = html;
</script>
</body>
</html>